<?php


namespace app\admin\controller\base;


use app\admin\service\base\ClassesService;
use app\BaseController;
use think\response\Json;

class Classes extends BaseController
{
    /**
     * 班级列表
     * @return Json
     */
    public function index(ClassesService $classesService):Json
    {
        $params = request()->param();
        return $classesService->index($params);
    }

    /**
     * 详情
     * @param ClassesService $classesService
     * @return Json
     */
    public function read(ClassesService $classesService):Json
    {
        $params = request()->param();
        return $classesService->read($params);
    }

    /**
     * 创建班级
     * @return Json
     */
    public function save(ClassesService $classesService):Json
    {
        $params = request()->param();
        return $classesService->save($params);
    }

    /**
     * 更新班级信息
     * @return Json
     */
    public function update(ClassesService $classesService):Json
    {
        $params = request()->param();
        return $classesService->update($params);
    }


    /**
     * 删除班级信息
     * @return Json
     */
    public function delete(ClassesService $classesService):Json
    {
        $params = request()->param();
        return $classesService->delete($params);
    }

}